home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / CUCD / Sound / SPlayer / Socks5 / examples / server_2_multiple_server.examp < prev    next >
Text File  |  1997-06-18  |  6KB  |  148 lines

  1. File Name: server_2_multiple_server.example
  2.  
  3. 1.Example - socks5 Username/Password server to multiple Kerberos servers 
  4.           authentication
  5.  
  6. # This example describes a socks5 environment with:
  7. # - three single-homed servers S5SV1, S5SV2, and S5SV3 on network 163.201.56
  8. #   with one client, CL1 and destination dest1
  9. #
  10. # S5SV1 and CL1 use Username/Password authentication
  11. # S5SV2 and S5SV3 use Kerberos and support Username/Password authentication
  12. #
  13. # S5SV1 has one socks5 user user1
  14. # CL1 has one socks5 user user4
  15. #
  16. # S5SV2 uses Kerberos id S5SV2.ker.id 
  17. # S5SV3 uses Kerberos id S5SV3.ker.id
  18. #
  19. # CL1 has one socks5 user, user4, who can issue all commands to any destination
  20. # using any port on network 163.201.56. using server S5SV1:3000.
  21. #
  22. # When S5SV1:3000 receives a request for destination Dest1, whose IP address
  23. # is 163.201.56.5 on any port, S5SV1 sends the request to proxy server S5SV2
  24. #
  25. # When S5SV1 receives a request for any other destination on 163.201.56, S5SV1
  26. # sends the request to proxy server S5SV3. If S5SV3 is not available, S5SV1 
  27. # sends the request to S5SV2. If S5SV2 is not available, the command fails.
  28.  
  29.                                          Kerberos
  30.                                          --------
  31.                            ____________ | S5SV2  |___________
  32.                           |              --------            |
  33.                           |                                  | 
  34.          -------       --------                            ---------
  35.         | CL1   |---- | S5SV1  |        163.201.56        | Dest1   |
  36.          -------       --------                            ---------
  37.                     Username/Password                        | 
  38.                      IP 163.201.56.1      --------           |
  39.                           |_____________ | S5SV3  |__________|
  40.                                           --------
  41.                                          Kerberos 
  42.  
  43.  
  44. 2. Server Environment Variables
  45.  
  46. # You must tell the server where to find the configuration file. You can do so
  47. # in one of three ways:
  48. #  - Set the environment variable SOCKS5_CONFFILE
  49. #  - Include the socks5.conf file in the default directory, usually /etc
  50. #  - Build with the --with-srvconffile=path option
  51. # This example demonstrates using environment variables. The example path is 
  52. # arbitrary.
  53.  
  54. # Set the environment variables for S5SV1, S5SV2 and S5SV3.
  55.  
  56. # S5SV1:3000
  57. setenv SOCKS5_CONFFILE /socksdir/run/socks5.conf.3000
  58. setenv SOCKS5_PWDFILE  /socksdir/run/socks5.passwd
  59. setenv SOCKS5_USER user1
  60. setenv SOCKS5_PASSWD pass1
  61. setenv SOCKS5_NONETMASKCHECK
  62.  
  63. # S5SV2:2000
  64. setenv SOCKS5_CONFFILE /socksdir/run/socks5.conf.2000
  65. setenv SOCKS5_PWDFILE  /socksdir/run/socks5.passwd
  66. setenv SOCKS5_USER user2
  67. setenv SOCKS5_PASSWD pass2
  68. setenv SOCKS5_NONETMASKCHECK
  69.  
  70. # S5SV3:3050
  71. setenv SOCKS5_CONFFILE /socksdir/run/socks5.conf.3050
  72. setenv SOCKS5_PWDFILE  /socksdir/run/socks5.passwd
  73. setenv SOCKS5_USER user3
  74. setenv SOCKS5_PASSWD pass3
  75. setenv SOCKS5_NONETMASKCHECK
  76.  
  77. 3. Server Configuration File socks5.conf
  78.  
  79. # These are the socks5.conf files for S5SV1 with Username/Password
  80. # authentication, S5SV2 and S5SV3 with Kerberos and Username/Password
  81. # authentication.
  82. #
  83. # The socks5.conf files must be in the directories specified in the
  84. # SOCKS5_CONFFILE environment variable or the default directory, usually /etc
  85. # S5SV1:3000   filename  /socksdir/run/socks5.conf.3000
  86. auth 163.201. - u
  87. permit u - 163.201. 163.201. - - user1,user2,user3,user4
  88. socks5 Dest1 - S5SV2:2000  
  89. socks5 163.201.56. - S5SV3:3050,S5SV2:2000
  90.  
  91. #S5SV2:2000 filename /socksdir/run/socks5.conf.2000
  92. auth 163.201. - u,k
  93. permit u,k - 163.201. 163.201. - - user1,user2,user3,user2.ker.id, /
  94. user3.ker.id,user4
  95.  
  96. #S5SV3:3050 filename /socksdir/run/socks5.conf.3050
  97. auth 163.201. - u,k
  98. permit u,k - 163.201. 163.201. - - user1,user2,user3,user2.ker.id, /
  99. user3.ker.id,user4
  100.  
  101. 4. Server socks5 Password File 
  102.  
  103. # This is the socks5 Username/Password file. It should be in the directory
  104. # specified in the SOCKS5_PWDFILE environment variable, or the default
  105. # directory, usually /etc
  106. # This file should reside on all three servers or be accessible to all three
  107. # servers.
  108. # To add more users, place each user on a new line with username and password
  109. # separated by white space.
  110.  
  111. user1 pass1
  112. user2 pass2
  113. user3 pass3
  114. user4 pass4
  115.  
  116. 5. Runtime mode
  117.  
  118. # To start the socks5 daemons in standalone mode on S5SV1 on bindport 3000, 
  119. # S5SV1:3000, at the command prompt, type:
  120. #         ./socks5 -b 3000
  121. # To start the socks5 daemons in standalone mode on S5SV2 on bindport 2000,
  122. # S5SV2:2000, at the command prompt, type:
  123. #         ./socks5 -b 2000
  124. # To start the socks5 daemons in standalone mode on S5SV3 on bindport 3050
  125. # S5SV3:3050, at the command prompt, type:
  126. #         ./socks5 -b 3050
  127.  
  128. 6. Client Configuration File libsocks5.conf
  129.  
  130. # This is the libsocks5.conf configuration file for clientA. It must be in the
  131. # directory specified in the build, or in the default directory, usually /etc.
  132.  
  133. socks5 - 163.201.64. -  sam 163.201.56.1:3000     #sam is the unix userid 
  134.  
  135. 7. Client Environment Variables
  136. # In this example, because the client and the server are on the same network,
  137. # it is most efficient to run the socks5 client without a libsocks5.conf file.
  138. # The client connects directly to the server. To directly connect:
  139. # - do not set the SOCKS5_NONETMASKCHECK environment variable
  140. # - set the SOCKS5_SERVER S5SV1:3000 or include the build option
  141. #    --with-default-server=S5SV1:3000. See the configure man page for
  142. #         additional information about this build option.
  143.  
  144. # Environment variables with a libsocks5.conf file
  145. setenv SOCKS5_NONETMASKCHECK
  146. setenv SOCKS5_USER user2
  147. setenv SOCKS5_PASSWD pass2
  148.